/**
 * @Auto generation code
 * Cycle Order Controller J
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, loading
 * allSubOrder - GET
 */
export const allSubOrder = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/allSubOrder/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * orderAndRenew - GET
 */
export const orderAndRenew = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/and-renew/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * queryServiceUsers - POST
 */
export const queryServiceUsers = async (loading) => {
	return await request.post('/customer/cycle-order/appointServiceUsers', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * firstServiceTime - POST
 */
export const firstServiceTime = async (loading) => {
	return await request.post('/customer/cycle-order/firstServiceTime', {
		
	}, {
		
	}, loading)
}


 console.log('存在delete方法，未兼容/customer/cycle-order/recover/${id}，后端需要更正');
/**
 * 
 * path, params, body, loading
 * renew - POST
 */
export const renew = async (loading) => {
	return await request.post('/customer/cycle-order/renew', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * updateCycleRule - POST
 */
export const updateCycleRule = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.post('/customer/cycle-order/rule/${id}', {
		
	}, {
		
	}, loading)
}


 console.log('存在put方法，未兼容/customer/cycle-order/rule/${id}，后端需要更正');
/**
 * 
 * path, params, loading
 * getServiceCustomStock - GET
 */
export const getServiceCustomStock = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/serviceStock/${id}', {
		
	}, loading)
}


 console.log('存在delete方法，未兼容/customer/cycle-order/stopSchedule/${id}，后端需要更正');
/**
 * 
 * path, params, loading
 * timesLog - GET
 */
export const timesLog = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/timesLog/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 周期订单详情 - GET
 */
export const getCustomCycleOrderDetail = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/${id}', {
		
	}, loading)
}


 console.log('存在delete方法，未兼容/customer/cycle-order/${id}，后端需要更正');
/**
 * 
 * path, params, loading
 * 获得周期订单中不能修改的子订单 - GET
 */
export const getCustomCycleOrderSubList = async (, {// path params
		id   // 周期订单ID ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/${id}/suborders', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取用户周期订单列表 - GET
 */
export const getCustomCycleOrderList = async ({// query params
		start ,   // start  
		limit   // limit  
	
}, loading) => {
	return await request.get('/customer/cycle-order', {
		 start,  limit, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * createCycleOrder - POST
 */
export const createCycleOrder = async ({// query params
		src   // src  
	
}, loading) => {
	return await request.post('/customer/cycle-order', {
		 src, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * getOneWeekCycleRule - POST
 */
export const getOneWeekCycleRule = async (loading) => {
	return await request.post('/customer/cycle-order/rule/calculate', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * getCycleRule - GET
 */
export const getCycleRule = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/rule/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取长期定的子订单列表 - GET
 */
export const getCustomCycleOrderSubList = async (, {// path params
		id   // id ,必填 
	
}, {// query params
		start ,   // start  
		limit  = param.default   // limit  
	
}, loading) => {
	return await request.get('/customer/cycle-order/${id}/children', {
		 start,  limit, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务计划配置时间和日期 - GET
 */
export const getTimeWeek = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/cycle-order/${id}/week-time', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 获取服务可用时间 - POST
 */
export const getServiceAvailable = async (, {// path params
		orderId   // orderId ,必填 
	
}, loading) => {
	return await request.post('/customer/cycle-order/${orderId}/available', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 库存确认接口 - POST
 */
export const checkServiceAvailable = async (loading) => {
	return await request.post('/stock/accept', {
		
	}, {
		
	}, loading)
}

